from django.db import models
from django.forms import ModelForm

# Create your models here.
class Accounts(models.Model):
    account_name     = models.CharField(max_length=30)
    account_password = models.CharField(max_length=30)
    user_name        = models.CharField(max_length=60)
    email            = models.EmailField()
    
    def isExists(self, name, password):
        print "================================"
        print self.account_name
        print unicode(name)
        print self.account_password
        print unicode(password)
        print "================================"
        return self.account_name == unicode(name) and self.account_password == unicode(password)
    
class AccountsForm(ModelForm):
    class Meta:
        model = Accounts
